Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HSTS response headers and provide method for adding additional response headers #425

Merged
merged 4 commits into from
Jan 27, 2018

Conversation

aaronhurt
Copy link
Member

Support for adding the HSTS header that may help address a small part of #168 and let you get an A+ on Qualys SSL test.

I've deployed this in our DEV and QA environments and verified it is working and adding the HSTS headers as configured.

@aaronhurt
Copy link
Member Author

I put the response header bits in a new function under http_headers.go called addResponseHeders and added a new TestAddResponseHeaders to http_headers_test.go. Currently the STS headers are the only things being added via the addResponseHeaders function but I assume that could change in the future.

@aaronhurt aaronhurt changed the title add support for HSTS response headers Add support for HSTS response headers and provide method for adding additional response headers Jan 24, 2018
@magiconair
Copy link
Contributor

Interesting. I assume you tested this since I thought you'd need to overwrite the ModifyResponse function in the reverse proxy. An integration test might be handy. If this works then I can refactor the ugly hack that I have for getting the response body size and status code.

Could you please update config/load_test.go with the new arguments and add the docs as well? Then I'll merge this.

Thx

@aaronhurt
Copy link
Member Author

aaronhurt commented Jan 26, 2018 via email

@aaronhurt
Copy link
Member Author

Okay, the docs, configuration tests and integration test are now committed.

Copy link
Contributor

@magiconair magiconair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@magiconair magiconair merged commit faf933b into fabiolb:master Jan 27, 2018
@magiconair magiconair added this to the 1.5.7 milestone Jan 27, 2018
@aaronhurt aaronhurt deleted the feature/add-hsts-support branch January 22, 2020 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants